#include "CIconButton.h"
#include <QDebug>

CIconButton::CIconButton(QWidget *parent)
    : QPushButton(parent)
{

}

CIconButton::CIconButton(const QString &text, QWidget *parent)
    : QPushButton(text,parent)
{

}

CIconButton::CIconButton(const QIcon &icon, const QString &text, QWidget *parent)
    : QPushButton(icon,text,parent)
{

}

void CIconButton::resizeEvent(QResizeEvent *event)
{
    int nLength = qMin(event->size().width(),event->size().height());
    QPushButton::resize(nLength,nLength);
}
